﻿using DataModels.Enums.Vehicle;
using SqlSugar;

namespace DataModels.Entities.Vehicle
{
    [SugarTable("vehiclebasic")]
    public class VehicleBasic
    {
        [SugarColumn(IsPrimaryKey = true)]
        public Guid UUID { get; set; } = Guid.NewGuid();

        /// <summary>
        /// 用户ID
        /// </summary>
        public Guid UserUUID { get; set; }

        /// <summary>
        /// 项目ID
        /// </summary>
        public Guid ProjectUUID { get; set; }

        /// <summary>
        /// 车场ID
        /// </summary>
        public Guid ParkingLotUUID { get; set; }

        /// <summary>
        /// 车位ID
        /// </summary>
        public Guid ParkingSpaceUUID { get; set; }

        /// <summary>
        /// 关系状态
        /// </summary>
        public VehicleStatus Status { get; set; } = VehicleStatus.Active;

        /// <summary>
        /// 开始日期
        /// </summary>
        public DateTime StartDate { get; set; }

        /// <summary>
        /// 结束日期（可为空，表示永久关系）
        /// </summary>
        public DateTime? EndDate { get; set; }


        /// <summary>
        /// 车辆牌号
        /// </summary>
        public string LicensePlate { get; set; }

        /// <summary>
        /// 车辆类型
        /// </summary>
        public VehicleType VehicleType { get; set; }

        /// <summary>
        /// 动力类型
        /// </summary>
        public VehiclePowerSource VehiclePowerSource {  get; set; }

        /// <summary>
        /// 车辆品牌
        /// </summary>
        public string Brand { get; set; }

        /// <summary>
        /// 车辆型号
        /// </summary>
        public string Model { get; set; }

        /// <summary>
        /// 车辆颜色
        /// </summary>
        public string Color { get; set; }

        /// <summary>
        /// 车架号
        /// </summary>
        public string VIN { get; set; }

        /// <summary>
        /// 车主姓名
        /// </summary>
        public string OwnerName { get; set; }

        /// <summary>
        /// 车主联系电话
        /// </summary>
        public string OwnerPhone { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public Guid CreateUser { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        public Guid UpdateUser { get; set; }

        /// <summary>
        /// 扩展数据
        /// </summary>
        [SugarColumn(ColumnDataType = "JSON")]
        public string ExtraData { get; set; } // 扩展数据
    }
}
